<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        body {
            perspective: 500px;
        }
        
        ul {
            width: 600px;
            margin: 100px auto;
        }
        
        li {
            list-style: none;
            float: left;
            margin-left: 30px;
        }
        
        .box {
            position: relative;
            width: 100px;
            height: 30px;
            /* 子盒子保持 3d 特效 */
            transform-style: preserve-3d;
            /* background-color: #f00; */
            transition: all 1s;
        }
        
        .box:hover {
            transform: rotateX(90deg);
        }
        
        .front,
        .bottom {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            text-align: center;
            line-height: 30px;
        }
        
        .front {
            background-color: yellow;
            z-index: 1;
            transform: translateZ(15px);
        }
        
        .bottom {
            background-color: blue;
            transform: translateY(15px) rotateX(-90deg);
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
    </ul>

</body>

</html>